#include "config.h"

ConfigReader* ConfigReader::instance = NULL;

/*
    Is singleton
    Loads ini file and provides some properties stored in that file
*/
ConfigReader::ConfigReader() {
    // private constructor
}

void ConfigReader::init(QString fileName) {
    if (instance == NULL) {
        instance = new ConfigReader();
    }
    instance->properyList = new QSettings(fileName, QSettings::IniFormat);
}

QString ConfigReader::getProperty(QString property) {
    QString res = instance->properyList->value(property, NULL).toString();
    return res;
}
